package com.ruoyi.peopleinfo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.peopleinfo.mapper.PeopleHistoryMapper;
import com.ruoyi.peopleinfo.domain.PeopleHistory;
import com.ruoyi.peopleinfo.service.IPeopleHistoryService;

/**
 * 就诊历史Service业务层处理
 * 
 * @author y
 * @date 2022-03-03
 */
@Service
public class PeopleHistoryServiceImpl implements IPeopleHistoryService 
{
    @Autowired
    private PeopleHistoryMapper peopleHistoryMapper;

    /**
     * 查询就诊历史
     * 
     * @param id 就诊历史主键
     * @return 就诊历史
     */
    @Override
    public PeopleHistory selectPeopleHistoryById(Integer id)
    {
        return peopleHistoryMapper.selectPeopleHistoryById(id);
    }

    /**
     * 查询就诊历史列表
     * 
     * @param peopleHistory 就诊历史
     * @return 就诊历史
     */
    @Override
    public List<PeopleHistory> selectPeopleHistoryList(PeopleHistory peopleHistory)
    {
        return peopleHistoryMapper.selectPeopleHistoryList(peopleHistory);
    }

    /**
     * 新增就诊历史
     * 
     * @param peopleHistory 就诊历史
     * @return 结果
     */
    @Override
    public int insertPeopleHistory(PeopleHistory peopleHistory)
    {
        return peopleHistoryMapper.insertPeopleHistory(peopleHistory);
    }

    /**
     * 修改就诊历史
     * 
     * @param peopleHistory 就诊历史
     * @return 结果
     */
    @Override
    public int updatePeopleHistory(PeopleHistory peopleHistory)
    {
        return peopleHistoryMapper.updatePeopleHistory(peopleHistory);
    }

    /**
     * 批量删除就诊历史
     * 
     * @param ids 需要删除的就诊历史主键
     * @return 结果
     */
    @Override
    public int deletePeopleHistoryByIds(Integer[] ids)
    {
        return peopleHistoryMapper.deletePeopleHistoryByIds(ids);
    }

    /**
     * 删除就诊历史信息
     * 
     * @param id 就诊历史主键
     * @return 结果
     */
    @Override
    public int deletePeopleHistoryById(Integer id)
    {
        return peopleHistoryMapper.deletePeopleHistoryById(id);
    }
}
